const Map = {
  [`config_${process.env.xvueNameSpace_}basic_pie`]: { s: 'trueName', y: 'trueValue' },
  [`config_${process.env.xvueNameSpace_}multidimensional_pie`]: { s: 'trueName', y: 'trueValue' },
  [`config_${process.env.xvueNameSpace_}rose_pie`]: { s: 'trueName', y: 'trueValue' },
  [`config_${process.env.xvueNameSpace_}chain_comparison_indicator_bar`]: { s: 'name', y: 'value' },
  [`config_${process.env.xvueNameSpace_}biaxial_line_line`]: { x: 'name', y1: 'value', z1: 'value' },
  [`config_${process.env.xvueNameSpace_}uniaxial_line`]: { x: 'name', y: 'value', s: 'seriesName', y1: 'value' },
  [`config_${process.env.xvueNameSpace_}stacked_area`]: { x: 'name', y: 'value', s: 'seriesName', y1: 'value' },
  [`config_${process.env.xvueNameSpace_}uniaxial_bar`]: { x: 'name', y: 'value', s: 'seriesName' },
  [`config_${process.env.xvueNameSpace_}single_biaxial_line_bar`]: { x: 'name', y: 'value', z: 'value' },
  [`config_${process.env.xvueNameSpace_}tree_map`]: {
    name: 'target',
    value: 'value',
    parent: 'source',
    source: 'source',
    target: 'target',
  },
  [`config_${process.env.xvueNameSpace_}k_line_config`]: { x: 'x', y1: 'vaule', y2: 'vaule', y3: 'vaule', y4: 'vaule' },
  [`config_${process.env.xvueNameSpace_}ladder_waterfall`]: { x: 'x', y1: 'vaule', y2: 'vaule', y3: 'vaule' },
  [`config_${process.env.xvueNameSpace_}heat_map`]: {
    row: 'value',
    column: 'value',
    value: 'value',
  },
  [`config_${process.env.xvueNameSpace_}shape_chart`]: {
    x: 'name',
    y: 'value',
  },
  [`config_${process.env.xvueNameSpace_}sankey`]: {
    source: 'source',
    target: 'target',
    value: 'value',
  },
  [`config_${process.env.xvueNameSpace_}relationship_diagram`]: {
    parent: 'source', // 兼容旧数据
    child: 'target', // 兼容旧数据
    source: 'source',
    target: 'target',
    value: 'value',
  },
  [`config_${process.env.xvueNameSpace_}scatter`]: {
    s: 'category',
    x: 'axisX',
    y: 'axisY',
    c: 'value',
  },
  [`config_${process.env.xvueNameSpace_}gantt_chart`]: {
    s: 'sData',
    t1: 't1SeriesData',
    t2: 't2SeriesData',
    y: 'groupY',
  },
  [`config_${process.env.xvueNameSpace_}table_gantt_chart`]: {
    s: 'sData',
    t1: 't1SeriesData',
    t2: 't2SeriesData',
    y: 'groupY',
  },
  [`config_${process.env.xvueNameSpace_}biaxial_line_bar`]: {
    x: 'name',
    y1: 'value',
    y2: 'value',
    y3: 'value',
    y4: 'value',
    z1: 'value',
    z2: 'value',
    z3: 'value',
    z4: 'value',
  },
};

export function getComponentEmitConfig(componentName) {
  return Map[componentName] || {};
}
